<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="/themes/admin/assets/css/layui.css">
  </head>
  <body>
    <form class="layui-form" action="">
      <div class="layui-form-item">
        <label class="layui-form-label">网站标题</label>
        <div class="layui-input-block">
          <input type="text" name="title" required value="{$siteInfo.title}"  lay-verify="required"  autocomplete="off" class="layui-input">
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">副标题</label>
        <div class="layui-input-block">
          <input type="text" name="subtitle" required value="{$siteInfo.subtitle}" lay-verify="required"  autocomplete="off" class="layui-input">
        </div>
      </div>
      <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">网站关键字</label>
        <div class="layui-input-block">
          <textarea name="keyword"  class="layui-textarea">{$siteInfo.keyword}</textarea>
        </div>
      </div>
      <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">网站描述</label>
        <div class="layui-input-block">
          <textarea name="description"  class="layui-textarea">{$siteInfo.description}</textarea>
        </div>
      </div>
      <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">网站备案号</label>
        <div class="layui-input-block">
          <input type="text" name="record_number" required value="{$siteInfo.record_number}" class="layui-input">
        </div>
      </div>
      <div class="layui-form-item">
        <div class="layui-input-block">
          <button class="layui-btn" id="btn-submit" >立即提交</button>
        </div>
      </div>
    </form>
    <script src="/themes/admin/assets/layui.js"></script>
    <script src="/themes/admin/assets/jquery-3.2.1.min.js"></script>
    <script>
      layui.use('form');
      layui.use('layer');
      $("#btn-submit").click(function(event){
        event.preventDefault();
        $.ajax({
          type:"post",
          data:$("form").serialize(),
          url:"/admin/system/config",
          success:function(e){
            if(e.code == 1){
              layer.msg("修改成功",{icon:1});
            }else{
              layer.msg("修改失败");
            }
          }
        });

      });
    </script>
  </body>
</html>
